[AccessoryAccess] Add bindings up to Xcode 27.0 Beta 3#25982
Conversation
Bind the AccessoryAccess framework (macOS 27.0), resolving all entries in tests/xtro-sharpie/api-annotations-dotnet/macOS-AccessoryAccess.todo: * AAUSBAccessory (NSSecureCoding) * AAUSBAccessoryManager (with the shared manager + listener registration) * AAUSBAccessoryMatchingCriteria (NSCopying) * AAUSBAccessoryListener protocol * AAErrorCode / AAErrorDomain * AAUSBAccessoryMatchingCriteriaInterfaceMatchingOption Register the framework for macOS, update the LinkMode=None linked-frameworks test, regenerate the documentation known-failures baseline, and remove the resolved .todo file. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR adds a new macOS binding surface for Apple’s AccessoryAccess framework (macOS 27.0), integrates it into the build’s framework registration/defines, and updates test baselines to reflect the new public API.
Changes:
- Added new binding definitions for AccessoryAccess (types, enums, protocol, and async-friendly APIs).
- Registered AccessoryAccess as a macOS framework and enabled
HAS_ACCESSORYACCESSfor .NET macOS builds. - Updated linked-framework expectations and regenerated documentation known-failures; removed the resolved xtro todo.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tools/common/Frameworks.cs | Registers AccessoryAccess as a macOS framework (27.0). |
| tests/xtro-sharpie/api-annotations-dotnet/macOS-AccessoryAccess.todo | Removes resolved xtro annotations for AccessoryAccess. |
| tests/dotnet/UnitTests/ProjectTest.cs | Updates macOS LinkMode=None linked-framework expectations to include AccessoryAccess. |
| tests/cecil-tests/Documentation.KnownFailures.txt | Regenerates doc-known-failure baseline for newly introduced AccessoryAccess symbols. |
| src/rsp/dotnet/macos-defines-dotnet.rsp | Adds -d:HAS_ACCESSORYACCESS define for .NET macOS builds. |
| src/frameworks.sources | Adds AccessoryAccess to the macOS frameworks list used by the build. |
| src/build/dotnet/generator-frameworks.g.cs | Updates generated framework-availability helpers to include AccessoryAccess. |
| src/accessoryaccess.cs | Introduces the AccessoryAccess binding definitions (macOS 27.0). |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ [PR Build #b8c602d] Build passed (Build macOS tests) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
|
Note to self we must run size tests when adding a new framework, or maybe just run them all the time... |
This comment has been minimized.
This comment has been minimized.
* Rename the AAUSB* types to AAUsb* (Usb casing) per review, preserving the native Objective-C names via [BaseType (Name=)], [Protocol (Name=)] and [Native (...)]. * Bind the IOUSBHostDevice handle delivered by AAUsbAccessory.Open as IntPtr instead of NSObject (IOUSBHost is intentionally not bound in macios; the raw handle is valid until Close). * Regenerate the documentation known-failures baseline for the renamed symbols. * Update the macOS expected app size files to account for the new AccessoryAccess types in Microsoft.macOS.dll. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| // 'device' is a live IOUSBHostDevice handle (an IOUSBHost Objective-C object). IOUSBHost is | ||
| // intentionally not bound in macios (a low-level IOKit/DriverKit-adjacent, NS_REFINED_FOR_SWIFT | ||
| // framework; see IGNORED_MACOS_FRAMEWORKS in tests/xtro-sharpie/Makefile), so the handle is surfaced | ||
| // as a raw IntPtr that stays valid until the accessory is closed (Close). To perform USB I/O, hand | ||
| // the accessory to a native/Swift service via CreateXpcRepresentation, or bridge the handle through | ||
| // native IOUSBHost code. |
There was a problem hiding this comment.
At least part of this information sounds like it could be useful in an xml comment on the delegate.
There was a problem hiding this comment.
@copilot understand the context and please apply this suggestion
There was a problem hiding this comment.
Addressed in 8e8538b. I added XML documentation to AAUsbAccessoryOpenCompletionHandler, including the device handle semantics and native IOUSBHost guidance.
Co-authored-by: dalexsoto <204671+dalexsoto@users.noreply.github.com>
Co-authored-by: dalexsoto <204671+dalexsoto@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ [CI Build #c01806c] Prepare .NET Release succeeded ✅📦 Published NuGet packages (32 packages)iOS
MacCatalyst
macOS
tvOS
Other
Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@copilot go fix this |
This comment has been minimized.
This comment has been minimized.
Co-authored-by: dalexsoto <204671+dalexsoto@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
🔥 [PR Build #8e8538b] Build failed (Build packages) 🔥Build failed for the job 'Build packages' (with job status 'Failed') Pipeline on Agent |
🔥 [PR Build #8e8538b] Build failed (Detect API changes) 🔥Build failed for the job 'Detect API changes' (with job status 'Failed') Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
The AAUsbAccessoryOpenCompletionHandler delegate now has XML documentation
comments, so remove its stale entry from the cecil documentation
known-failures baseline. This fixes the Cecil.Tests.Documentation.
VerifyEveryVisibleMemberIsDocumented failure ("1 API marked as a known
failure but now documented").
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
🚀 [CI Build #584be51] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 191 tests passed 🎉 Tests counts✅ assembly-processing: All 1 tests passed. Html Report (VSDrops) Download macOS tests✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |
Bind the AccessoryAccess framework (macOS 27.0), resolving all entries in tests/xtro-sharpie/api-annotations-dotnet/macOS-AccessoryAccess.todo:
Register the framework for macOS, update the LinkMode=None linked-frameworks test, regenerate the documentation known-failures baseline, and remove the resolved .todo file.